package com.lonely.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lonely.common.core.domain.TimeLine;
import com.lonely.goods.domain.dto.log.AddNotesDTO;
import com.lonely.order.domain.dto.order.AddOrderLogDTO;
import com.lonely.order.domain.entity.SysOrderLog;
import com.lonely.goods.domain.vo.log.OrderNoteLogVO;

import java.util.List;
import java.util.Set;

/**
 * 订单日志服务接口
 * author: fzzf
 */
public interface IOrderLogService extends IService<SysOrderLog> {


    /**
     * 获取指定订单号的日志时间线
     *
     * @param produceOrderId
     * @return
     */
    List<TimeLine> getOrderLogTimeLine(Long produceOrderId);

    /**
     * 添加备注
     *
     * @param addNotes
     */
    void addNotes(AddNotesDTO addNotes);

    /**
     * 获取指定订单的备注日志列表
     *
     * @param orderId
     * @return
     */
    List<OrderNoteLogVO> getOrderNoteLogs(Long orderId);


    /**
     * 获取指定订单id集合对应的订单日志中包含备注类型的订单id
     *
     * @param orderIds
     * @return
     */
    Set<Long> hasOrderNoteLogByOrderIds(List<Long> orderIds);

    /**
     * 添加订单日志
     *
     * @param orderId
     * @param message
     */
    void addOrderLog(Long orderId, String message);

    /**
     * 批量添加订单日志
     *
     * @param addOrderLogs
     */
    void batchAddOrderLog(List<AddOrderLogDTO> addOrderLogs);
}
